{smcl}
{cmd:help dtest} 
{right:also see:  {help lpoly}   }
{hline}

{title:Title}

{cmd: dtest}{hline 2}Discontinuity Test of Exogeneity


{title:Syntax}

{cmdab:         dtest} {it:yvar} {it:xvar} [{it:controls}] {cmdab:if} [{bf:,}{it: options}]

{it:     options}            {txt: description}
     {hline}
     {txt:Required}
	 
	{bf:xbar}             {txt:specify the value at which the test is implemented}
	{bf:h} 		      {txt:specify kernel bandwidth}
	{bf:p}		      {txt:specify degree of the polynomial (recommended p = 1)}

     {txt:Optional}
	{bf:{ul:k}ernel({it:string})}   {txt:specify kernel function; default is}
	                   {bf:kernel(epanechnikov)}{txt:; refer to {help lpoly} for details}
					   
     {hline}

{title:Description}

   {bf:dtest}{txt: implements the discontinuity test of endogeneity developed by Caetano (2015)} 
   {txt:"A Test of Exogeneity without Instrumental Variables in Models with Bunching".}
